package com.bohua.intermediary.controller;

import com.bohua.intermediary.common.Lay;
import com.bohua.intermediary.common.Msg;
import com.bohua.intermediary.entity.SysWages;
import com.bohua.intermediary.service.SysWagesService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
/**
 * 控制器
 * @author qian
 * @email 1415261159@qq.com
 * @date 2019/01/19
 */
@Controller
@RequestMapping("/sysWages")
public class SysWagesController {
    @Resource
    private SysWagesService sysWagesService;

    @RequestMapping
    public String sysWages(){
        return "sysWages/sysWages";
    }
    @RequestMapping("/add")
    public String add(){
        return "sysWages/addSysWages";
    }

    @RequestMapping("/update")
    public String update(){
        return "sysWages/updateSysWages";
    }

    @RequestMapping("/getSysWagess")
    @ResponseBody
    public Lay getSysWagess(SysWages sysWages,Integer page,Integer limit){
        return sysWagesService.getSysWagess(sysWages,page,limit);
    }
    @RequestMapping("/addSysWages")
    @ResponseBody
    public Msg addSysWages(SysWages sysWages){
        return sysWagesService.addSysWages(sysWages);
    }

    @RequestMapping("/updateSysWages")
    @ResponseBody
    public Msg updateSysWages(SysWages sysWages){
        return sysWagesService.updateSysWages(sysWages);
    }

    @RequestMapping("/delSysWages")
    @ResponseBody
    public Msg delSysWages(SysWages sysWages){
        return sysWagesService.delSysWages(sysWages);
    }
}
